import request, { download } from '@/utils/request'

// 查询机房巡检记录列表
export function getrecordList (query) {
  return request({
    url: '/function/inspection/place/record/list',
    method: 'get',
    params: query
  })
}
// 获取新增巡检记录列表
export function getrecordAddList (query) {
  return request({
    url: '/function/inspection/project/recordAdd/list',
    method: 'get',
    params: query
  })
}
// 新增机房巡检记录
export function Createdrecord (query) {
  return request({
    url: '/function/inspection/place/record',
    method: 'post',
    data: query
  })
}
// 修改机房巡检记录
export function Updaterecord (query) {
  return request({
    url: '/function/inspection/place/record',
    method: 'put',
    data: query
  })
}
// 删除机房巡检记录
export function deleterecord (query) {
  return request({
    url: '/function/inspection/place/record/' + query,
    method: 'delete'
  })
}

// 获取新增巡检记录列表
export function getonlineaddList (query) {
  return request({
    url: '/function/inspection/project/online/recordAdd/list',
    method: 'get',
    params: query
  })
}
// 查询线上巡检记录列表
export function getonlineList (query) {
  return request({
    url: '/function/inspection/online/record/list',
    method: 'get',
    params: query
  })
}

// 获取线上巡检记录详细信息
export function getonlineaddChlidren (query) {
  return request({
    url: '/function/inspection/online/record/' + query,
    method: 'get'
  })
}
// 新增线上巡检记录
export function Createdonline (query) {
  return request({
    url: '/function/inspection/online/record',
    method: 'post',
    data: query
  })
}
// 修改线上巡检记录
export function Updateonline (query) {
  return request({
    url: '/function/inspection/online/record',
    method: 'put',
    data: query
  })
}

// 删除线上巡检记录
export function deleteonline (query) {
  return request({
    url: '/function/inspection/online/record/' + query,
    method: 'delete'
  })
}
// 导出线上巡检记录列表
export function downloadList (query, name) {
  return download(
    '/function/inspection/online/record/export',
    query,
    name
  )
}

// 查询值班记录列表
export function getdutyList (query) {
  return request({
    url: '/function/duty/record/list',
    method: 'get',
    params: query
  })
}

// 获取值班记录详细信息
export function getdutyChlidren (query) {
  return request({
    url: '/function/duty/record/' + query,
    method: 'get'
  })
}
// 新增值班记录
export function Createdduty (query) {
  return request({
    url: '/function/duty/record',
    method: 'post',
    data: query
  })
}
// 修改线上巡检记录
export function Updateduty (query) {
  return request({
    url: '/function/duty/record',
    method: 'put',
    data: query
  })
}
// 删除线上巡检记录
export function Deleteduty (query) {
  return request({
    url: '/function/duty/record/' + query,
    method: 'delete',
  })
}